package event.motor

class BarCodeTestChangedEvent(val raw: ByteArray) : MotorCode() {
    fun barCode(): String {
        if (raw.size <= 5) {
            throw Exception("没有条码")
        }
        val len = raw.size - 5
        val buf = ByteArray(len)
        System.arraycopy(raw, 3, buf, 0, len)
        return String(buf)
    }
}